X-Original-To: alpine-devel@lists.alpinelinux.org Delivered-To: alpine-devel@mail.alpinelinux.org Received: from rully.inferentia.it (rully.inferentia.it [217.29.162.11]) by mail.alpinelinux.org (Postfix) with ESMTP id 7EC5BDC0086 for ; Fri, 24 May 2013 11:15:27 +0000 (UTC) Received: from ALBANA.actived.com (albana.actived.com [172.18.10.76]) by rully.inferentia.it (8.14.4/8.14.4) with ESMTP id r4OBFPeR008108 for ; Fri, 24 May 2013 13:15:25 +0200 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message X-Mailinglist: alpine-devel Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01CE586F.FD87D3FD" Subject: [alpine-devel] Change root partition question Date: Fri, 24 May 2013 13:15:25 +0200 Message-ID: <1A58FF57AABF6245928D353C034C451A03703CA9@ALBANA.actived.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Change root partition question Thread-Index: Ac5Yb/29dmDopM7ZR+C4HJlGVw087g== From: "Luca Bianchi" To: This is a multi-part message in MIME format. ------_=_NextPart_001_01CE586F.FD87D3FD Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi=20 I'm playing with alpine 2.4.5 on XCP and try to change the root partion of default installation This is the default device where I have installed alpine alpine:~# fdisk -l /dev/xvda Disk /dev/xvda: 25.7 GB, 25769803776 bytes 255 heads, 63 sectors/track, 3133 cylinders Units =3D cylinders of 16065 * 512 =3D 8225280 bytes Device Boot Start End Blocks Id System /dev/xvda1 * 1 13 102399+ 83 Linux Partition 1 does not end on cylinder boundary /dev/xvda2 13 267 2036736 82 Linux swap Partition 2 does not end on cylinder boundary /dev/xvda3 267 3134 23026688 83 Linux Then I have added a new device , format the partition and coping all files from / partition alpine:~# fdisk -l /dev/xvdb Disk /dev/xvdb: 4294 MB, 4294967296 bytes 255 heads, 63 sectors/track, 522 cylinders Units =3D cylinders of 16065 * 512 =3D 8225280 bytes Device Boot Start End Blocks Id System /dev/xvdb1 1 522 4192933+ 83 Linux This Is the UUID list alpine:~# blkid /dev/xvdb1: UUID=3D"4bb19343-c06c-42f1-8181-c8b45dab18df" TYPE=3D"ext4" -----> the new / partition /dev/xvda1: UUID=3D"cde4c3b5-86cc-4ccd-93f4-2495d6c67e5f" TYPE=3D"ext4"=20 /dev/xvda2: UUID=3D"ceec35d0-56a8-4e33-a348-34a1e3ac25a6" TYPE=3D"swap"=20 /dev/xvda3: UUID=3D"ab8e47dd-53ce-4515-b5dc-72a9ebab58fa" TYPE=3D"ext4"=20 I have change the fstab file alpine:~# cat /etc/fstab UUID=3Dab8e47dd-53ce-4515-b5dc-72a9ebab58fa /oldroot ext4 rw,relatime,nobarrier,data=3Dordered 0 0 UUID=3D4bb19343-c06c-42f1-8181-c8b45dab18df / ext4 rw,relatime,nobarrier,data=3Dordered 0 0 UUID=3Dcde4c3b5-86cc-4ccd-93f4-2495d6c67e5f /boot ext4 rw,relatime,nobarrier,data=3Dordered 0 0 UUID=3Dceec35d0-56a8-4e33-a348-34a1e3ac25a6 swap swap default 0 0 /dev/cdrom /media/cdrom iso9660 noauto,ro 0 0 /dev/fd0 /media/floppy vfat noauto 0 0 /dev/usbdisk /media/usb vfat noauto 0 0 And added nobarrier option in fs mount to crosschek the new fs mount after the boot When I reboot I got this=20 alpine:~# df -k Filesystem 1K-blocks Used Available Use% Mounted on mdev 1024 4 1020 0% /dev shm 509280 0 509280 0% /dev/shm /dev/xvda3 22664700 485956 21027412 2% / ------------> old / partition tmpfs 509280 260 509020 0% /run cgroup_root 10240 0 10240 0% /sys/fs/cgroup /dev/xvda3 22664700 485956 21027412 2% /oldroot -------------> same as / /dev/xvda1 99146 16139 77888 17% /boot / is always mounted on old device /dev/xvd3 , the /dev/xvdb1 is no show If i list mount option see / and /oldroot are mounted without the nobarrier option , so seem that the fstab file is ignored when system mount / partition alpine:~# mount rootfs on / type rootfs (rw) proc on /proc type proc (rw,nosuid,nodev,noexec,relatime) sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime) mdev on /dev type tmpfs (rw,nosuid,relatime,size=3D1024k,mode=3D755) devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=3D5,mode=3D620,ptmxmode=3D000) shm on /dev/shm type tmpfs (rw,nosuid,nodev,noexec,relatime) /dev/xvda3 on / type ext4 (rw,relatime,data=3Dordered) tmpfs on /run type tmpfs (rw,nosuid,nodev,relatime,mode=3D755) securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime) debugfs on /sys/kernel/debug type debugfs (rw,nosuid,nodev,noexec,relatime) cgroup_root on /sys/fs/cgroup type tmpfs (rw,nosuid,nodev,noexec,relatime,size=3D10240k,mode=3D755) openrc on /sys/fs/cgroup/openrc type cgroup (rw,nosuid,nodev,noexec,relatime,release_agent=3D/lib/rc/sh/cgroup-releas= e -agent.sh,name=3Dopenrc) cpuset on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset) cpu on /sys/fs/cgroup/cpu type cgroup (rw,nosuid,nodev,noexec,relatime,cpu) cpuacct on /sys/fs/cgroup/cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpuacct) devices on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices) freezer on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer) blkio on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio) /dev/xvda3 on /oldroot type ext4 (rw,relatime,data=3Dordered) /dev/xvda1 on /boot type ext4 (rw,relatime,nobarrier,data=3Dordered) ------_=_NextPart_001_01CE586F.FD87D3FD Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Change root partition question

Hi
I'm playing with alpine 2.4.5 on XCP = and try to change the root partion of default installation

This is the default device where I = have installed alpine

alpine:~# fdisk -l /dev/xvda

Disk /dev/xvda: 25.7 GB, 25769803776 = bytes
255 heads, 63 sectors/track, 3133 = cylinders
Units =3D cylinders of 16065 * 512 = =3D 8225280 bytes

    Device = Boot      = Start         = End      Blocks  Id System
/dev/xvda1   = *           = 1          = 13      102399+ 83 Linux
Partition 1 does not end on cylinder = boundary
/dev/xvda2       &nbs= p;      = 13         = 267     2036736  82 Linux swap
Partition 2 does not end on cylinder = boundary
/dev/xvda3       &nbs= p;     267        = 3134    23026688  83 Linux


Then I have added a new device , = format the partition and coping all files from / partition

alpine:~# fdisk -l /dev/xvdb

Disk /dev/xvdb: 4294 MB, 4294967296 = bytes
255 heads, 63 sectors/track, 522 = cylinders
Units =3D cylinders of 16065 * 512 = =3D 8225280 bytes

    Device = Boot      = Start         = End      Blocks  Id System
/dev/xvdb1       &nbs= p;       = 1         = 522     4192933+ 83 Linux

This Is the UUID list

alpine:~# blkid
/dev/xvdb1: = UUID=3D"4bb19343-c06c-42f1-8181-c8b45dab18df" = TYPE=3D"ext4"     -----> the  new = /  partition
/dev/xvda1: = UUID=3D"cde4c3b5-86cc-4ccd-93f4-2495d6c67e5f" = TYPE=3D"ext4"
/dev/xvda2: = UUID=3D"ceec35d0-56a8-4e33-a348-34a1e3ac25a6" = TYPE=3D"swap"
/dev/xvda3: = UUID=3D"ab8e47dd-53ce-4515-b5dc-72a9ebab58fa" = TYPE=3D"ext4"

I have change the fstab file

alpine:~# cat /etc/fstab
UUID=3Dab8e47dd-53ce-4515-b5dc-72a9ebab58fa  &= nbsp;    = /oldroot        = ext4    rw,relatime,nobarrier,data=3Dordered 0 0
UUID=3D4bb19343-c06c-42f1-8181-c8b45dab18df  &= nbsp;    = /            =    ext4    rw,relatime,nobarrier,data=3Dordered = 0 0
UUID=3Dcde4c3b5-86cc-4ccd-93f4-2495d6c67e5f  &= nbsp;    = /boot           = ext4    rw,relatime,nobarrier,data=3Dordered 0 0
UUID=3Dceec35d0-56a8-4e33-a348-34a1e3ac25a6  &= nbsp;    = swap            = swap    default 0 0
/dev/cdrom     = /media/cdrom     iso9660 noauto,ro 0 0
/dev/fd0       = /media/floppy    vfat    noauto  0 = 0
/dev/usbdisk   = /media/usb       vfat    = noauto  0 0

And added nobarrier option in fs = mount to crosschek the new fs mount after the boot

When I reboot I got this

alpine:~# df -k
Filesystem       &nbs= p;   1K-blocks      Used Available = Use% Mounted on
mdev        &nbs= p;            = ; 1024         = 4      1020   0% /dev
shm         = ;            = 509280         = 0    509280   0% /dev/shm
/dev/xvda3       &nbs= p;    22664700    485956  = 21027412   2% = /            = ------------> old / partition
tmpfs        &nb= sp;          = 509280       260    = 509020   0% /run
cgroup_root       &nb= sp;      = 10240         = 0     10240   0% /sys/fs/cgroup
/dev/xvda3       &nbs= p;    22664700    485956  = 21027412   2% /oldroot   -------------> same as = /
/dev/xvda1       &nbs= p;       99146     = 16139     77888  17% /boot

/ is always mounted on old device = /dev/xvd3  , the /dev/xvdb1 is no show

If i list mount option see / and = /oldroot are mounted without the nobarrier option , so seem that the = fstab file is ignored when

system mount / partition

alpine:~# mount
rootfs on / type rootfs (rw)
proc on /proc type proc = (rw,nosuid,nodev,noexec,relatime)
sysfs on /sys type sysfs = (rw,nosuid,nodev,noexec,relatime)
mdev on /dev type tmpfs = (rw,nosuid,relatime,size=3D1024k,mode=3D755)
devpts on /dev/pts type devpts = (rw,nosuid,noexec,relatime,gid=3D5,mode=3D620,ptmxmode=3D000)
shm on /dev/shm type tmpfs = (rw,nosuid,nodev,noexec,relatime)
/dev/xvda3 on / type ext4 = (rw,relatime,data=3Dordered)
tmpfs on /run type tmpfs = (rw,nosuid,nodev,relatime,mode=3D755)
securityfs on /sys/kernel/security = type securityfs (rw,nosuid,nodev,noexec,relatime)
debugfs on /sys/kernel/debug type = debugfs (rw,nosuid,nodev,noexec,relatime)
cgroup_root on /sys/fs/cgroup type = tmpfs (rw,nosuid,nodev,noexec,relatime,size=3D10240k,mode=3D755)
openrc on /sys/fs/cgroup/openrc type = cgroup = (rw,nosuid,nodev,noexec,relatime,release_agent=3D/lib/rc/sh/cgroup-releas= e-agent.sh,name=3Dopenrc)

cpuset on /sys/fs/cgroup/cpuset type = cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
cpu on /sys/fs/cgroup/cpu type = cgroup (rw,nosuid,nodev,noexec,relatime,cpu)
cpuacct on /sys/fs/cgroup/cpuacct = type cgroup (rw,nosuid,nodev,noexec,relatime,cpuacct)
devices on /sys/fs/cgroup/devices = type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
freezer on /sys/fs/cgroup/freezer = type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
blkio on /sys/fs/cgroup/blkio type = cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
/dev/xvda3 on /oldroot type ext4 = (rw,relatime,data=3Dordered)
/dev/xvda1 on /boot type ext4 = (rw,relatime,nobarrier,data=3Dordered)









------_=_NextPart_001_01CE586F.FD87D3FD-- --- Unsubscribe: alpine-devel+unsubscribe@lists.alpinelinux.org Help: alpine-devel+help@lists.alpinelinux.org ---